package vns.server.domain;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import com.google.appengine.api.datastore.Key;
import com.google.appengine.api.datastore.Text;
import vns.shared.ObjectTypeTextDTO;

public class ObjectTypeText {
    @PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
    private Key id;
	
	@Persistent
	private Text value;
	
	public ObjectTypeText(ObjectTypeTextDTO objectTypeTextDTO){
		this.value=objectTypeTextDTO.getValue();
	}
	
	public void updatefromDTO(ObjectTypeTextDTO objectTypeTextDTO){
		this.value=objectTypeTextDTO.getValue();
	}
	
	public ObjectTypeTextDTO toDTO(){
		ObjectTypeTextDTO otText=new ObjectTypeTextDTO(this.id,this.value);
		return otText;
	}
	
	public Key getId(){
		return id;
	}
	
	public Text getValue(){
		return value;
	}
	
	public void setValue(Text Value){
		this.value=Value;
	}
}
